In complex programs, such as multi-threaded applications in a database management system, as an example SAP's HANA® database (DB), it is inevitable that there will be some “bugs,” or errors in the computer program code or other part of the computing system. One particular type of bug involves a wrong reference counting, which may cause memory leaks. If such memory leaks accumulate over time, they may consume resources, such as memory, that are needed elsewhere. Similarly, another type of bug includes an object being destroyed in one thread while another thread is referencing that object, in which the program will most likely crash or fail.
Current SAP HANA® DB already employs a different version of debug references, albeit not yet for asynchronous continuations. These debug references require annotating not only reference classes (handles, smart pointers, etc.), but also each object to be referenced to include an anchor object storing information about references. Unfortunately, this anchor object is fairly big, so it does interfere at memory management level.
Further, current HANA® DB implementation limits number of collected references to 8 (due to space limitations in the anchor object), so if the object is referenced often (having 1000s of references for some objects is a valid use case), the space is not sufficient to store information about all the references and some will be inevitably lost.
What is needed is a system and method for obtaining additional useful debugging information for the above-described types of bugs.